const controller = require('../controllers').drawLine;
const checkAdmin = require('../utils/checkAdmin');

module.exports = (app) => {  
    //获得全部数据
    app.get('/api/v1/getLine', controller.listAll);
    //获得id为:id的数据
    // app.get('/api/v1/overfall/:id', overfallcauseController.getById);
    //根据name获取
    // app.get('/api/v1/overfall/name/:name', overfallcauseController.getByName);
    //根据用户id
    // app.get('/api/v1/overfall/user/:user', overfallcauseController.getByUser);
    // 添加数据
    app.post('/api/v1/addLine', controller.create);
    //更新数据
    app.patch('/api/v1/editLine/:id', controller.update);
    //删除数据
    app.delete('/api/v1/deleteLine/:id', controller.delete);
};